@import './font.scss';

// .noise-texture {
//   background-image: var(--c-bg-img);
// }

.bg-texture.theme-dark,
.theme-dark .bg-texture {
  background-image: url('/texture/dark_mosaic.png');
}

.bg-texture.theme-bright,
.theme-bright .bg-texture {
  background-image: url('/texture/so-white.png');
}

html body {
  position: fixed;
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: var(--c-text-primary);
  // font-size: 14px;
  font-size: 1rem;
  font-family: josefin sans, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  h1, h2, h3, h4, h5, h6 {
    color: var(--c-text-primary);
  }
}

a,
a[href],
a[class],
.a-link {
  // color: currentColor;
  text-decoration: none;
  color: var(--c-text-primary);

  &:hover {
    // text-decoration: underline;
    color: var(--c-text-link);
  }
}

a:focus,
input:focus,
li:focus,
p:focus,
button:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  // -webkit-user-modify: read-write-plaintext-only;
}

ul,
li {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.nowrap {
  white-space: nowrap;
}

.top-banner {
  width: 100%;
  height: 500px;
  background: no-repeat center center;
  background-size: cover;
  overflow: hidden;
}

.rotate180 {
  display: inline-block;
  transform: rotate(180deg);
}

.button {
  margin: 10px 0;
  padding: 10px 15px;
  background-color: rgba($color: #000, $alpha: .2);
  border-radius: 10px;
  cursor: pointer;

  &:hover {
    background-color: rgba($color: #000, $alpha: .3);
  }

  &:active {
    background-color: rgba($color: #000, $alpha: .4);
  }
}

.line-ellipsis {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.double-line-ellipsis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.skeleton li,
.skeleton span {
  opacity: .2;
  background: linear-gradient(90deg,
    var(--c-fade-fg-50) 25%,
    var(--c-fade-fg-85) 7%,
    var(--c-fade-fg-50) 83%,
  );
  background-size: 400% 100%;
  border-radius: 5px;
  animation: skeleton-loading 2s ease infinite;
}

.skeleton-content {
  display: block;
  height: 1em;
}

.skeleton-title {
  @extend .skeleton-content;
  width: 50%;
}

.skeleton-desc {
  @extend .skeleton-content;
  width: 70%;
}

.skeleton-tag {
  @extend .skeleton-content;
  margin-top: .1em !important;
  width: 30%;
}

.skeleton-icon {
  display: inline-block;
  height: 1em;
  width: 1em;
}

.skeleton-center {
  margin: 0 auto;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%
  }
  to {
    background-position: 0 50%
  }
}

.text-gray {
  color: var(--c-text-secondary) !important;

  &:hover {
    color: var(--c-underlinenav-text-hover) !important;
  }
}

.icon-hover:hover {
  background-color: var(--c-text-secondary);
  color: var(--c-text-primary) !important;
  text-shadow: 0 0 6px var(--c-text-primary);
}

// .vue-custom-scrollbar {
//   width: 100%;
//   height: 100%;
// }

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  &:hover {
    background-color: rgba(255, 255, 255, .1);
  }
}

.layout-default-mobile {
  &::-webkit-scrollbar {
    width: 0 !important;
  }
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .5);
    // background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, .3) 75%, transparent 75%, transparent);
    background-color: var(--m-color-opacity-2-bg-primary);
    border-radius: 5px;
    &:hover {
      background-color: var(--m-color-opacity-5-bg-primary);
    }
    &:active {
      background-color: var(--m-color-opacity-8-bg-primary);
    }
}

.loading-box {
  display: flex;
  width: 100%;
  min-height: 50px;
  justify-content: center;
  align-items: center;
  color: var(--c-text-placeholder);

  .slm {
    margin-right: 10px;
    vertical-align: middle;
  }
}

.load-success {
  animation: .5s vanishInSmall;
}

@keyframes vanishInSmall{
  0%{
    opacity: 0;
    transform-origin: 50% 50%;
    transform: scale(1.5);
    filter: blur(90px)
  }
  to{
    opacity: 1;
    transform-origin: 50% 50%;
    transform:scale(1);
    filter: blur(0)
  }
}

#__nuxt {
  overflow: hidden;
  height: 100vh;
}

// antd
// i.ant-time-picker-icon, i.ant-time-picker-clear {
//   color: var(--antd-wave-shadow-color);
//   background-color: transparent;
// }

// scrollbar

// .gm-scrollbar.-vertical:hover {
// //   @include themify($themes) {
// //     background-color: rgba($color: themed('bg-dp1-color-f'), $alpha: 0.4);
// //   }
//   background-color: transparent;
// }

// // .gm-scroll-view {
// //   overflow: hidden;
// // }

// .gm-scrollbar.-horizontal {
//   background-color: transparent;
// }

// .gm-scrollbar div.thumb {
//   @include themify($themes) {
//     background-color: rgba($color: themed('a-color'), $alpha: 0.4);
//   }
// }

// .gm-scrollbar-disable-selection .gm-scrollbar div.thumb {
//     background-color: #c5cfe2;
// }

// .gm-scrollbar div.thumb:hover {
//   @include themify($themes) {
//     background-color: rgba($color: themed('a-hover-color'), $alpha: .7);
//   }
// }

// 20.10.28后vue-gemini-scrollbar在
// .layout > .gm-scrollbar-container > .-horizontal {
//   width: 0 !important;
//   .thumb { width: 0 !important; }
// }

// 移动端布局兼容
// .layout-default-mobile {}

// .ps-container > .ps-scrollbar-x-rail {
//   visibility: hidden;
// }
// .ps-container > .ps-scrollbar-y-rail {
//   visibility: hidden;
// }
// html .ps .ps__rail-y:hover {
//   background-color: transparent;
// }
// .ps .ps--clicking {
//   background-color: var(--m-color-opacity-2-bg-primary) !important;
// }
// .ps__thumb-y {
//   background-color: var(--m-color-opacity-8-bg-primary) !important;
// }